import express from 'express'

const app = express()
// 访问dist目录
app.use(express.static("dist"))

const template = `
    <html>
        <head>
            <title>React Fiber</title>
        </head>
        <body>
            <div id="root"></div>
            <script src="bundle.js"></script>
        </body>
    </html>
`
app.get("*",(req,res) => {
    res.send(template)
})

app.listen(3000, () => console.log(`server is running: http://localhost:3000`))